<% if @file.is_image? %>
  <%= image_tag model_model_file_path(@model, @file, format: @file.extension), alt: @file.name, style: "width: 100%" %>
<% elsif @file.is_video? %>
  <%= video_tag model_model_file_path(@model, @file, format: @file.extension), alt: @file.name, style: "width: 100%", controls: true %>
<% elsif @file.is_document? %>
  <%= tag.iframe src: model_model_file_path(@model, @file, format: @file.extension), alt: @file.name, style: "width: 100%; aspect-ratio: 0.707" %>
<% elsif @file.is_renderable? %>
  <%= Renderer(file: @file) %>
<% end %>
